<html><head>
        <title>Formulir Data Kematian Penduduk</title>
        <link href="<?php echo base_url('assets/css/formkematian.css') ?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('assets/js/jquery-ui.css'); ?>" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-1.9.1.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-ui.js'); ?>"></script>
        <script type="text/javascript">
            $(function() {
                $("#tgl_mati").datepicker({changeMonth: true, changeYear: true});
            });
        </script>
    </head>
    <body>
        <form action="<?php echo base_url('kematian/simpan_ubah'); ?>" method="post">
            <input type="hidden" name="idkematian" value="<?php echo $data_kematian->idkematian; ?>" />
            <table width="90%" border="0" align="center">
                <tr>
                    <td colspan="6" class="trheader">Formulir Data Kematian Penduduk</td>
                </tr>
                <tr>
                    <td width="159">No. Surat Kematian</td>
                    <td colspan="2"><input type="text" name="no_form" id="no_form" class="textinput" value="<?php echo $data_kematian->no_form; ?>" /></td>
                    <td colspan="3">&nbsp;</td>
                </tr>
                <tr>
                    <td>Nomor Kartu Keluarga</td>
                    <td colspan="2"><input type="text" name="no_kk" id="no_kk" class="textinput" value="<?php echo $data_kematian->no_kk; ?>"/></td>
                    <td colspan="3"><input type="submit" name="cari_kk" id="cari_kk" value="Cari Data KK" class="radiobutton-kiri"/></td>
                </tr>
                <tr>
                    <td colspan="6" class="jeda">Data Jenazah</td>
                </tr>
                <tr>
                    <td>NIK</td>
                    <td colspan="2"><input type="text" name="nik_mati" id="nik_mati" class="textinput" value="<?php echo $data_kematian->nik; ?>""/></td>
                    <td colspan="3"><input type="submit" name="cari_penduduk" id="cari_penduduk" value="Cari Data Penduduk" class="radiobutton-kiri"/></td>
                </tr>
                <tr>
                    <td>Tanggal Kematian</td>
                    <td colspan="2"><input type="text" name="tgl_mati" id="tgl_mati" class="textinput" value="<?php echo $data_kematian->tgl_mati; ?>"/></td>
                    <td colspan="3">Pukul<input type="text" name="pukul" id="pukul" class="textinputdua" value="<?php echo $data_kematian->pukul; ?>" />
                        WIB</td>
                </tr>  
                <tr>
                    <td>Tempat Kematian</td>
                    <td colspan="2"><select name="tempat_kematian" id="tempat_kematian" class="list">
                            <?php
                            $tk = $_POST[idkematian];
                            //form ubah Tempat Kematian
                            if ($tk > 0) {
                                ?>
                                <option value="<?php echo $data_kematian->tempat_kematian; ?>"><?php echo $data_kematian->tempat_kematian; ?></option>
                            <?php } ?>
                            <option value="Tenaga Kesehatan">Rumah Sakit</option>
                            <option value="Bukan Rumah Sakit">Bukan Rumah Sakit</option>
                        </select></td>
                </tr>
                <tr>
                    <td>Desa</td>
                    <td colspan="2"><input type="text" name="desa_kematian" id="desa_kematian" class="textinput" value="<?php echo $data_kematian->desa_kematian; ?>" /></td>
                    <td colspan="3">Kabupaten 
                        <input type="text" name="kab_kematian" id="kab_kematian" class="textinput" value="<?php echo $data_kematian->kab_kematian; ?>"  /></td>
                </tr>
                <tr>
                    <td>Sebab Kematian</td>
                    <td colspan="2"><select name="sebab" id="sebab" class="list">
                            <?php
                            $sbb = $_POST[idkematian];
                            //form ubah Sebab Kematian
                            if ($sbb > 0) {
                                ?>
                                <option value="<?php echo $data_kematian->sebab; ?>"><?php echo $data_kematian->sebab; ?></option>
                            <?php } ?>
                            <option value="Sakit Biasa/Tua">Sakit Biasa/Tua</option>
                            <option value="Wabah Penyakit">Wabah Penyakit</option>
                            <option value="Kecelakaan">Kecelakaan</option>
                            <option value="Kriminalitas">Kriminalitas</option>
                            <option value="Bunuh Diri">Bunuh Diri</option>
                            <option value="Lainnya">Lainnya</option>
                        </select></td>
                </tr>
                <tr>
                    <td>Yang menerangkan</td>
                    <td colspan="2"><select name="penerang" id="penerang" class="list">
                            <?php
                            $penerang = $_POST[idkematian];
                            //form ubah Sebab Kematian
                            if ($penerang > 0) {
                                ?>
                                <option value="<?php echo $data_kematian->penerang; ?>"><?php echo $data_kematian->penerang; ?></option>
                            <?php } ?>
                            <option value="Dokter">Dokter</option>
                            <option value="Perawat">Perawat</option>
                            <option value="Polisi">Kepolisian</option>
                            <option value="Tenaga Kesehatan">Tenaga Kesehatan</option>
                            <option value="Lainnya">Lainnya</option>
                        </select></td>
                    <td colspan="2">&nbsp;</td>
                    <td>&nbsp;&nbsp;</td>
                </tr>
                <td colspan="6" class="jeda">Data Pelapor</td>
                </tr>
                <tr>
                    <td>NIK Pelapor</td>
                    <td colspan="2"><input type="text" name="nik_pelapor" id="nik_pelapor" class="textinput" value="<?php echo $data_kematian->nik_pelapor; ?>"/></td>
                    <td>&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                    <td>Nama Pelapor</td>
                    <td colspan="2"><input type="text" name="nama_pelapor" id="nama_pelapor" class="textinput" value="<?php echo $data_kematian->nama_pelapor; ?>"/></td>
                    <td width="154">&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                    <td>Hubungan dengan yang mati</td>
                    <td colspan="2"><input type="text" name="hub_pelapor" id="hub_pelapor" class="textinput" value="<?php echo $data_kematian->hub_pelapor; ?>" /></td>
                    <td colspan="3">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="6" class="jeda">Data Saksi</td>
                </tr>
                <tr>
                    <td>NIK Saksi I</td>
                    <td colspan="2"><input type="text" name="nik_saksi_satu" id="nik_saksi_satu" class="textinput" value="<?php echo $data_kematian->nik_saksi_satu; ?>"/></td>
                    <td colspan="3">Nama Saksi I
                        &nbsp;<input type="text" name="nama_saksi_satu" id="nama_saksi_satu" class="textinput" value="<?php echo $data_kematian->nama_saksi_satu; ?>"/></td>
                </tr>
                <tr>
                    <td>NIK Saksi II</td>
                    <td colspan="2"><input type="text" name="nik_saksi_dua" id="nik_saksi_dua" class="textinput" value="<?php echo $data_kematian->nik_saksi_dua; ?>"/></td>
                    <td colspan="3">Nama Saksi II
                        <input type="text" name="nama_saksi_dua" id="nama_saksi_dua" class="textinput" value="<?php echo $data_kematian->nama_saksi_dua; ?>"/></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td width="129">&nbsp;</td>
                    <td width="63"><input type="submit" name="ubah" id="ubah" value="Ubah" class="btn btn-large""/></td>
                    <td>&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                </tr>
            </table>

        </form>
    </body>
</html>
